package com.originskyseed.platform.user.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.user.model.AnchorLevel;

/**
 * 主播等级体系Mapper类（OSI_ANCHOR_LEVEL）
 * 
 * @author Tangwanghui
 */
public interface AnchorLevelMapper {

	/**
	 * 删除记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 * 
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(AnchorLevel record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(AnchorLevel record) throws Exception;

	/**
	 * 更新记录
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(AnchorLevel record) throws Exception;


	/**
	 * 批量修改删除的状态标识
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int updateByIds(@Param("ids")List<String> ids,@Param("updateTime") Date updateTime) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(AnchorLevel record) throws Exception;

	/**
	 * 查询记录
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AnchorLevel selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询下一等级
	 *
	 * @param maxValue
	 * @return
	 * @throws Exception
	 */
	public AnchorLevel selectNexLevel(@Param("maxValue") BigDecimal maxValue) throws Exception;

	/**
	 * 查询列表
	 * 
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<AnchorLevel> selectList(AnchorLevel record) throws Exception;

	/**
	 * 分页查询列表
	 * 
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<AnchorLevel> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 查询经验值有无重复
	 * 
	 * @param anchorLevel
	 * @return
	 * @throws Exception
	 */
	public boolean selectEmpiricValue(AnchorLevel anchorLevel) throws Exception;


	/**
	 * 查询列表
	 *
	 * @param deptId
	 * @return
	 * @throws Exception
	 */
	public List<AnchorLevel> selectListByDeptId(String deptId) throws Exception;

}